<?php

use App\Http\Controllers\HomeController;
use Illuminate\Support\Facades\Route;

/**
 * =========栏目===============
 */

Route::get("/", [HomeController::class, 'index']);
Route::get('/test', [HomeController::class, 'test']);


//Midautumn模块
Route::get("{module}/admin/{name}", function ($module) {
    return app("Modules\\{$module}\Http\Controllers\\{$module}Controller")->index();
})->where(['module' => 'Midautumn', 'name' => '(.*)']);

//后备路由
Route::fallback(function () {
    return view("app");
});
